import request from '@/utils/request'

// 查询BOM物料半成品列表
export function listMaterialhalf(query) {
  return request({
    url: '/bomcostestimation/basedocument/materialhalf/list',
    method: 'get',
    params: query
  })
}

// 查询BOM物料半成品详细
export function getMaterialhalf(fid) {
  return request({
    url: '/bomcostestimation/basedocument/materialhalf/' + fid,
    method: 'get'
  })
}

// 新增BOM物料半成品
export function addMaterialhalf(data) {
  return request({
    url: '/bomcostestimation/basedocument/materialhalf',
    method: 'post',
    data: data
  })
}

// 修改BOM物料半成品
export function updateMaterialhalf(data) {
  return request({
    url: '/bomcostestimation/basedocument/materialhalf',
    method: 'put',
    data: data
  })
}

// 删除BOM物料半成品
export function delMaterialhalf(fid) {
  return request({
    url: '/bomcostestimation/basedocument/materialhalf/' + fid,
    method: 'delete'
  })
}
